package com.tzl.design_pattern.strategy_pattern;

import java.math.BigDecimal;

/**
 * @author Zhilei Tang
 * @date Created in 2020/11/14 17:28
 */
public class WechatPayStrategy implements PayStrategy {
  @Override
  public boolean pay(BigDecimal money) {
    System.out.printf("微信支付了%.2f元\n", money);
    return true;
  }

  @Override
  public BigDecimal queryBalance(String account) {
    System.out.printf("微信账号%s的余额为21.32元\n", account);
    return new BigDecimal("21.32");
  }
}
